package com.gin.kotlin.no_gay_alliance.database.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.gin.kotlin.no_gay_alliance.database.entity.BanTopic

@Dao
interface BanTopicDao {
    @Query("select * from BanTopic")
    fun list(): List<BanTopic>?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun add(topics: List<BanTopic>)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun add(topic: BanTopic)

    @Query("delete from BanTopic where topicId=:topicId")
    fun del(topicId: Long)

    @Query("delete from BanTopic")
    fun clear()
}